﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="net.sycu.guomy.ems.entity.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="ckeditor" uri="http://ckeditor.com" %>


<!DOCTYPE HTML>
<html>
<head>
<title>登录信息管理</title> --标题
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Novus Admin Panel Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template, 
SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- Bootstrap Core CSS -->
<link href="/EMS/css/bootstrap.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="/EMS/css/style.css" rel='stylesheet' type='text/css' />
<!-- font CSS -->
<!-- font-awesome icons -->
<link href="/EMS/css/font-awesome.css" rel="stylesheet"> 
<!-- //font-awesome icons -->
 <!-- js-->
<script src="/EMS/js/jquery-1.11.1.min.js"></script>
<script src="/EMS/js/modernizr.custom.js"></script>
<!--webfonts-->
<link href='/EMS/http://fonts.useso.com/css?family=Roboto+Condensed:400,300,300italic,400italic,700,700italic' rel='stylesheet' type='text/css'>
<!--//webfonts--> 
<!--animate-->
<link href="/EMS/css/animate.css" rel="stylesheet" type="text/css" media="all">
<script src="/EMS/js/wow.min.js"></script>
	<script>
		 new WOW().init();
	</script>
<!--//end-animate-->
<!-- chart -->
<script src="/EMS/js/Chart.js"></script>
<!-- //chart -->
<!--Calender-->
<link rel="/EMS/stylesheet" href="css/clndr.css" type="text/css" />
<script src="/EMS/js/underscore-min.js" type="text/javascript"></script>
<script src= "/EMS/js/moment-2.2.1.js" type="text/javascript"></script>
<script src="/EMS/js/clndr.js" type="text/javascript"></script>
<script src="/EMS/js/site.js" type="text/javascript"></script>
<!--End Calender-->
<!-- Metis Menu -->
<script src="/EMS/js/metisMenu.min.js"></script>
<script src="/EMS/js/custom.js"></script>
<link href="/EMS/css/custom.css" rel="stylesheet">
<!--//Metis Menu -->
</head> 
<body class="cbp-spmenu-push" onload="myLoad()">
<%@include file="/header.jsp"%>		
	<div class="main-content">
	
		<%@include file="/admin/adminSidebar.jsp"%>	
		<div id="page-wrapper">
		<div class="forms">
	
		 <h3 class="title1">部门消息管理</h3>
		 
		  <form class="form-horizontal" role="form" id="frmLogin"
        action="/EMS/admin/ManageLoginsServlet" method="post" >
             
             <input type="hidden" id="hidOperateType" name="hidOperateType" value="" />
            <input type="hidden" id="hidLoginId" name="hidLoginId" 
              value="${requestScope.ModifyLogin.loginId}" />
            <input type="hidden" id="hidCurrentPageIndex" name="hidCurrentPageIndex" 
              value="${currentPageIndex}" />
            <input type="hidden" id="hidSortField" name="hidSortField" value="${sortField}" />
            <input type="hidden" id="hidSortString" name="hidSortString" value="${sortString}" />
            <input type="hidden" id="hidPageSize" name="hidPageSize" value="${pageSize}" />
              
		 <div class="form-grids row widget-shadow" data-example-id="basic-forms"> 
		  <div class="form-title">
		    <label class="col-lg-15 control-label">输入登录信息</label>
		  </div>
		  <div class="form-body">           			 
			    <div class="form-group"> 
				  <label class="control-label">登录名</label> 
				    <input type="text" class="form-control" id="txtLoginName" name="txtLoginName" 
                          placeholder="登录名" value="${ModifyLogin.loginName}">
                        <span class="label label-danger" id="spanLoginName"></span>
                 </div>
				<div class="form-group"> 
				  <label class="control-label">Email</label> 
				    <input type="text" class="form-control" id="txtEmail" name="txtEmail" 
                          placeholder="Email" value="${ModifyLogin.email}">
                        <span class="label label-danger" id="spanEmail"></span>
				</div>
				
				<div class="form-group"> 
				  <label class="control-label">昵称</label> 
				   <input type="text" class="form-control" id="txtNickname" name="txtNickname" 
                          placeholder="昵称" value="${ModifyLogin.nickname}">
                 </div>
                 
                 <div class="form-group"> 
				  <label class="control-label">备注</label> 
				  <textarea class="form-control" rows="3" id="txtRemark" name="txtRemark" 
                          placeholder="备注">${ModifyLogin.remark}</textarea>
                 </div>
                 
                 <div class="form-group"> 
				  <label class="control-label">登录类型</label> 
				   <select class="form-control" id="selTypeId" name="selTypeId">
                          <option value="0">-请选择-</option>
                          <c:forEach items="${loginTypes}" var="loginType">
                          <option value="${loginType.loginTypeId}" 
                            <c:if test="${loginType.loginTypeId == ModifyLogin.typeId}">selected="selected"</c:if>>${loginType.loginTypeName}</option>
                          </c:forEach>
                        </select>
                 </div>
                 
                 <div class="form-group"> 
				  <label class="control-label">登录状态</label> 
				   <select class="form-control" id="selStateId" name="selStateId">
                          <option value="0">-请选择-</option>
                          <c:forEach items="${loginStates}" var="loginState">
                          <option value="${loginState.loginStateId}" 
                            <c:if test="${loginState.loginStateId == ModifyLogin.stateId}">selected="selected"</c:if>>${loginState.loginStateName}</option>
                          </c:forEach>
                        </select>
                 </div>
                 
                 <div class="form-group"> 
				  <label class="control-label">所属部门</label> 
				   <select class="form-control" id="selDepartmentId" name="selDepartmentId">
                          <option value="0">-请选择部门-</option>
                          <c:forEach items="${departments}" var="department">
                            <option value="${department.departmentId}" 
                              <c:if test="${ department.departmentId == ModifyLogin.departmentId}">selected="selected"</c:if>>${department.departmentName}</option>
                          </c:forEach>
                        </select>
                 </div>
                 
                
				
				
				<div class="form-group">                      
                         <c:if test="${empty requestScope.ModifyLogin}">
                         <button class="btn btn-primary" type="reset" onclick="addLogin()">添加</button>
                         <button type="reset" class="btn btn-default">取消</button>
                        </c:if>
                        <c:if test="${not empty requestScope.ModifyLogin}">
                         <button class="btn btn-primary" type="reset" onclick="saveLogin()">保存</button>
                         <button class="btn btn-default" type="reset" onclick="cancelSaveLogin()">取消保存</button>
                        </c:if>             
                  </div>			  
			</div>
		</div>
		
		
			<div class="form-grids row widget-shadow" data-example-id="basic-forms"> 
		  		<div class="form-title">
		   		 <label class="col-lg-15 control-label">查询部门消息</label>
		  		</div>
		  		 <div class="form-body">             		 
			    <div class="form-group"> 
				  <label class="control-label">登录名</label> 
				  <input type="text" class="form-control" id="txtSearchLoginName" name="txtSearchLoginName" 
                          placeholder="登录名" value="${searcher.loginName}">
                        <span class="label label-danger" id="spanSearch"></span>
                 </div>
                 
                 <div class="form-group"> 
				  <label class="control-label">Email</label> 
				   <input type="text" class="form-control" id="txtSearchEmail" name="txtSearchEmail" 
                          placeholder="Email" value="${searcher.email}">
                 </div>
                 
                 <div class="form-group"> 
				  <label class="control-label">昵称</label> 
				 <input type="text" class="form-control" id="txtSearchNickname" name="txtSearchNickname" 
                          placeholder="昵称" value="${searcher.nickname}">
                 </div>
                 
                 <div class="form-group"> 
				  <label class="control-label">备注</label> 
				  <textarea class="form-control" rows="3" id="txtSearchRemark" name="txtSearchRemark" 
                          placeholder="备注">${searcher.remark}</textarea>
                 </div>
                 
                 <div class="form-group"> 
				  <label class="control-label">登录次数</label> 
				  <input type="text" class="form-control" id="txtSearchLoginTimeMin" name="txtSearchLoginTimeMin" 
                          placeholder="登录次数" value="${searcher.loginTimeMin }">
                  <input type="text" class="form-control" id="txtSearchLoginTimeMax" name="txtSearchLoginTimeMax" 
                          placeholder="登录次数" value="${searcher.loginTimeMax }">
                 </div>
                 
                 <div class="form-group"> 
				  <label class="control-label">等级</label> 
				   <input type="text" class="form-control" id="txtSearchGradeMin" name="txtSearchGradeMin" 
                          placeholder="等级" value="${searcher.gradeMin }">
                     <input type="text" class="form-control" id="txtSearchGradeMax" name="txtSearchGradeMax" 
                          placeholder="等级" value="${searcher.gradeMax }">
                 </div>
                 
				<div class="form-group"> 
				  <label class="control-label">注册时间</label> 
				  <input type="text" class="form-control" id="txtSearchRegisterDateTimeBegin" name="txtSearchRegisterDateTimeBegin" 
                          placeholder="开始时间" value="${searcher.registerDateTimeBegin }">
                     <input type="text" class="form-control" id="txtSearchRegisterDateTimeEnd" name="txtSearchRegisterDateTimeEnd" 
                          placeholder="结束时间" value="${searcher.registerDateTimeEnd }">
                   
				</div>
				
				<div class="form-group"> 
				  <label class="control-label">注册IP</label> 
				 	<input type="text" class="form-control" id="txtSearchRegisterIp" name="txtSearchRegisterIp" 
                          placeholder="注册IP" value="${searcher.registerIp}"> 
				</div>
				
				<div class="form-group"> 
				  <label class="control-label">最后登录时间</label> 
				 	<input type="text" class="form-control" id="txtSearchLastLoginDateTimeBegin" name="txtSearchLastLoginDateTimeBegin" 
                          placeholder="开始时间" value="${searcher.lastLoginDateTimeBegin }">
                    <input type="text" class="form-control" id="txtSearchLastLoginDateTimeEnd" name="txtSearchLastLoginDateTimeEnd" 
                          placeholder="结束时间" value="${searcher.lastLoginDateTimeEnd }">
				</div>
				
				<div class="form-group"> 
				  <label class="control-label">最后登录IP</label> 
				 	<input type="text" class="form-control" id="txtSearchLastLoginIp" name="txtSearchLastLoginIp" 
                          placeholder="最后登录IP" value="${searcher.lastLoginIp}">
				</div>
				
				<div class="form-group"> 
				  <label class="control-label">登录类型</label> 
				 	<select class="form-control" id="selSearchTypeId" name="selSearchTypeId">
                          <option value="">-请选择-</option>
                          <c:forEach items="${loginTypes}" var="loginType">
                          <option value="${loginType.loginTypeId}" 
                            <c:if test="${loginType.loginTypeId == searcher.typeId}">selected="selected"</c:if>>${loginType.loginTypeName}</option>
                          </c:forEach>
                        </select>     
				</div>
				
				<div class="form-group"> 
				  <label class="control-label">登录状态</label> 
				 	<select class="form-control" id="selSearchStateId" name="selSearchStateId">
                          <option value="">-请选择-</option>
                          <c:forEach items="${loginStates}" var="loginState">
                          <option value="${loginState.loginStateId}" 
                            <c:if test="${loginState.loginStateId == searcher.stateId}">selected="selected"</c:if>>${loginState.loginStateName}</option>
                          </c:forEach>
                        </select>    
				</div>
				
				<div class="form-group"> 
				  <label class="control-label">所属部门</label> 
				 	<select class="form-control" id="selSearchDepartmentId" name="selSearchDepartmentId">
                          <option value="">-请选择部门-</option>
                          <c:forEach items="${departments}" var="department">
                            <option value="${department.departmentId}" 
                              <c:if test="${ department.departmentId == searcher.departmentId}">selected="selected"</c:if>>${department.departmentName}</option>
                          </c:forEach>
                        </select>     
				</div>
				
				<div class="form-group">
                             
               			<button class="btn btn-primary" type="reset" onclick="searchMessage()">查询</button>
                       <button class="btn btn-default" type="reset" onclick="cancelSearchMessage()">取消查询</button>       
                </div>			  
			</div>
			</div>			
	
		
		<div class="main-page">
			<div class="tables">
				<div class="clearfix"> </div>
				<div class="table-responsive bs-example widget-shadow">
						<h4>登录信息表:</h4>
						<table class="table table-bordered"> 
						  <thead> 
						    <tr>
	                          <th nowrap="nowrap"><input type="checkbox" id="chkSelectAll" onclick="selectAll()"></input> 全选</th>
	                          <th nowrap="nowrap"><a href="javascript: sorting('LoginId')">序号</a></th>
	                          <th nowrap="nowrap"><a href="javascript: sorting('LoginName')">登录名</a></th>
	                          <th nowrap="nowrap"><a href="javascript: sorting('Nickname')">昵称</a></th>
	                          <th nowrap="nowrap"><a href="javascript: sorting('Email')">Email</a></th>
	                          <th nowrap="nowrap"><a href="javascript: sorting('LoginTime')">登录数</a></th>
	                          <th nowrap="nowrap"><a href="javascript: sorting('Grade')">等级</a></th>
	                          <th nowrap="nowrap"><a href="javascript: sorting('RegisterDateTime')">注册情况</a></th>
	                          <th nowrap="nowrap"><a href="javascript: sorting('LastLoginDateTime')">最后登录情况</a></th>
	                          <th nowrap="nowrap"><a href="javascript: sorting('LoginStates.StateId')">状态</a></th>
	                          <th nowrap="nowrap"><a href="javascript: sorting('LoginTypes.TypeId')">类型</a></th>
	                          <th nowrap="nowrap"><a href="javascript: sorting('Departments.DepartmentId')">部门</a></th>
	                          <th nowrap="nowrap">操作</th>
	                        </tr>
						   </thead> 
						   <tbody>
						     <c:forEach items="${logins}" var="login" 
		                     begin="${(currentPageIndex - 1) * pageSize}" end="${currentPageIndex * pageSize - 1}"> 
		                     <tr>
		                       <td nowrap="nowrap" align="center">
	                            <input type="checkbox" id="chkLogin${login.loginId}" name="chkLogins" value="${login.loginId}" />
	                          </td>
	                          <td nowrap="nowrap">${login.loginId}</td>
	                          <td nowrap="nowrap">${login.loginName}</td>
	                          <td nowrap="nowrap">${login.nickname}</td>
	                          <td nowrap="nowrap">${login.email}</td>
	                          <td nowrap="nowrap">${login.loginTime}</td>
	                          <td nowrap="nowrap">${login.grade}</td>
	                          <td>${login.registerDateTime}<br>${login.registerIp}</td>
	                          <td>${login.lastLoginDateTime}<br>${login.lastLoginIp}</td>
	                          <td nowrap="nowrap">${login.loginState.loginStateName}</td>
	                          <td nowrap="nowrap">${login.loginType.loginTypeName}</td>
	                          <td nowrap="nowrap">${login.department.departmentName}</td>
	                          <td nowrap="nowrap">
		                           <button  onclick="modifyLogin(${login.loginId})"><i class="glyphicon-pencil"></i></button>
		                           <button  onclick="removeLogin(${login.loginId})"><i class="fa fa-trash-o mail-icon"></i></button>                       
		                       </td>
		                     </tr>
		                     </c:forEach>              								      
						 </tbody>
						 						  
					   </table>
					   
					 <div class="widget-foot">
  	    共${rowCount}条数据&nbsp;&nbsp;&nbsp;第${currentPageIndex}/${pageCount}页&nbsp;&nbsp;&nbsp;
	  	      		<label>
	                   <input type="radio" name="radPageSize" value="2" onclick="resize(this.value)" <c:if test="${pageSize == 2}">checked</c:if>>2条/页
	                 </label>
	                 <label>
	                   <input type="radio" name="radPageSize" value="3" onclick="resize(this.value)" <c:if test="${pageSize == 3}">checked</c:if>>3条/页
	                 </label>
	                 <label>
	                   <input type="radio" name="radPageSize" value="5" onclick="resize(this.value)" <c:if test="${pageSize == 5}">checked</c:if>>5条/页
	                 </label>
			  	     <ul class="pagination pull-right">
				  	    <c:if test="${currentPageIndex <= 1}">
				  	      <li><a>首页</a></li>
				  	      <li><a>上一页</a></li>
				  	    </c:if>
				  	    <c:if test="${currentPageIndex > 1}">
				  	      <li><a href="javascript: paging(1)">首页</a></li>
				  	      <li><a href="javascript: paging(${currentPageIndex - 1})">上一页</a></li>
				  	    </c:if>
				  	    <c:if test="${currentPageIndex >= pageCount}">
				  	      <li><a>下一页</a></li>
				  	      <li><a>尾页</a></li>
				  	    </c:if>
				  	    <c:if test="${currentPageIndex < pageCount}">
				  	      <li><a href="javascript: paging(${currentPageIndex + 1})">下一页</a></li>
				  	      <li><a href="javascript: paging(${pageCount})">尾页</a></li>
				  	    </c:if>
				  	    <li><a href="javascript: removeSelect()">删除选中</a></li>
				  	    <li><a target="_blank" href="/EMS/admin/ExportAllDepartmentsServlet">导出全部</a></li>
				  	    <li><a href="javascript: export()">导出</a></li>
			  	     </ul>
  	      			 <div class="clearfix"></div>
  	     		  </div>
  	     		  
					</div>					   
				</div>				   				
			</div>			
		</form>						
		</div>
	
		
		</div>
		<!--footer-->
		<div class="footer">
		   <p>Copyright &copy; 2016.EMS.</p>
		</div>
        <!--//footer-->
	</div>
	<!-- Classie -->
		<script src="/EMS/js/classie.js"></script>
		<script>
			var menuLeft = document.getElementById( 'cbp-spmenu-s1' ),
				showLeftPush = document.getElementById( 'showLeftPush' ),
				body = document.body;
				
			showLeftPush.onclick = function() {
				classie.toggle( this, 'active' );
				classie.toggle( body, 'cbp-spmenu-push-toright' );
				classie.toggle( menuLeft, 'cbp-spmenu-open' );
				disableOther( 'showLeftPush' );
			};
			

			function disableOther( button ) {
				if( button !== 'showLeftPush' ) {
					classie.toggle( showLeftPush, 'disabled' );
				}
			}
		</script>
	<!--scrolling js-->
	<script src="/EMS/js/jquery.nicescroll.js"></script>
	<script src="/EMS/js/scripts.js"></script>
	<!--//scrolling js-->
	<!-- Bootstrap Core JavaScript -->
   <script src="/EMS/js/bootstrap.js"> </script>
<script type="text/javascript">
function checkInput() {
  var txtLoginName = document.getElementById("txtLoginName");
  var spanLoginName = document.getElementById("spanLoginName");
  
  if (txtLoginName.value.length == 0) {
    spanLoginName.innerHTML = "登录名不能为空。";
    return false;
  }
  else {
    spanLoginName.innerHTML = "";
    return true;
  }
}

function checkSearch() {
  var txtSearchLoginName = document.getElementById("txtSearchLoginName");
  var txtSearchEmail = document.getElementById("txtSearchEmail");
  var txtSearchNickname = document.getElementById("txtSearchNickname");
  var txtSearchRemark = document.getElementById("txtSearchRemark");
  var txtSearchLoginTimeMin = document.getElementById("txtSearchLoginTimeMin");
  var txtSearchLoginTimeMax = document.getElementById("txtSearchLoginTimeMax");
  var txtSearchGradeMin = document.getElementById("txtSearchGradeMin");
  var txtSearchGradeMax = document.getElementById("txtSearchGradeMax");
  var txtSearchRegisterDateTimeBegin = document.getElementById("txtSearchRegisterDateTimeBegin");
  var txtSearchRegisterDateTimeEnd = document.getElementById("txtSearchRegisterDateTimeEnd");
  var txtSearchRegisterIp = document.getElementById("txtSearchRegisterIp");
  var txtSearchLastLoginDateTimeBegin = document.getElementById("txtSearchLastLoginDateTimeBegin");
  var txtSearchLastLoginDateTimeEnd = document.getElementById("txtSearchLastLoginDateTimeEnd");
  var txtSearchLastLoginIp = document.getElementById("txtSearchLastLoginIp");
  var selSearchStateId = document.getElementById("selSearchStateId");
  var selSearchTypeId = document.getElementById("selSearchTypeId");
  var selSearchDepartmentId = document.getElementById("selSearchDepartmentId");
  var spanSearch = document.getElementById("spanSearch");
  
  if (txtSearchLoginName.value.length == 0 
    && txtSearchEmail.value.length == 0
    && txtSearchNickname.value.length == 0
    && txtSearchRemark.value.length == 0
    && txtSearchLoginTimeMin.value.length == 0 
    && txtSearchLoginTimeMax.value.length == 0 
    && txtSearchGradeMin.value.length == 0 
    && txtSearchGradeMax.value.length == 0 
    && txtSearchRegisterDateTimeBegin.value.length == 0
    && txtSearchRegisterDateTimeEnd.value.length == 0
    && txtSearchRegisterIp.value.length == 0
    && txtSearchLastLoginDateTimeBegin.value.length == 0 
    && txtSearchLastLoginDateTimeEnd.value.length == 0 
    && txtSearchLastLoginIp.value.length == 0 
    && selSearchStateId.value.length == 0
    && selSearchTypeId.value.length == 0
    && selSearchDepartmentId.value.length == 0 ) {
    spanSearch.innerHTML = "查询条件不能为空。";
    return false;
  }
  else {
    spanSearch.innerHTML = "";
    return true;
  }
}

function addLogin() {
  if (checkInput()) {
    var frmLogin = document.getElementById("frmLogin");
    var hidOperateType = document.getElementById("hidOperateType");

    hidOperateType.value = "add";
    frmLogin.submit();
  }
}

function removeLogin(loginId) {
  if (confirm("确定要删除吗？")) {
    var frmLogin = document.getElementById("frmLogin");
    var hidOperateType = document.getElementById("hidOperateType");
    var hidLoginId = document.getElementById("hidLoginId");
    
    hidLoginId.value = loginId;
    hidOperateType.value = "remove";
    frmLogin.submit();
  }
}

function removeSelect() {
  var count = 0;
  var chkLogins = document.getElementsByName("chkLogins");

  for (var i = 0; i < chkLogins.length; i++) {
    if (chkLogins[i].checked)
      count++;
  }
  
  if (count < 1) {
    alert ("没有选中，不能删除");
  }
  else if (confirm("确定要删除选中吗？")) {
    var frmLogin = document.getElementById("frmLogin");
    var hidOperateType = document.getElementById("hidOperateType");

    hidOperateType.value = "removeSelect";
    frmLogin.submit();
  }
}

function modifyLogin(loginId) {
  var frmLogin = document.getElementById("frmLogin");
  var hidOperateType = document.getElementById("hidOperateType");
  var hidLoginId = document.getElementById("hidLoginId");
  
  hidLoginId.value = loginId;
  hidOperateType.value = "modify";
  frmLogin.submit();
}

function saveLogin() {
  if (checkInput()) {
    var frmLogin = document.getElementById("frmLogin");
    var hidOperateType = document.getElementById("hidOperateType");

    hidOperateType.value = "save";
    frmLogin.submit();
  }
}

function cancelSaveLogin() {
  var frmLogin = document.getElementById("frmLogin");
  var hidOperateType = document.getElementById("hidOperateType");

  hidOperateType.value = "cancelSave";
  frmLogin.submit();
}

function paging(pageIndex) {
  var frmLogin = document.getElementById("frmLogin");
  var hidOperateType = document.getElementById("hidOperateType");
  var hidCurrentPageIndex = document.getElementById("hidCurrentPageIndex");

  hidCurrentPageIndex.value = pageIndex;
  hidOperateType.value = "paging";
  frmLogin.submit();
}

function sorting(sortField) {
  var frmLogin = document.getElementById("frmLogin");
  var hidOperateType = document.getElementById("hidOperateType");
  var hidSortField = document.getElementById("hidSortField");

  hidSortField.value = sortField;
  hidOperateType.value = "sorting";
  frmLogin.submit();
}

function resize(pageSize) {
  var frmLogin = document.getElementById("frmLogin");
  var hidOperateType = document.getElementById("hidOperateType");
  var hidPageSize = document.getElementById("hidPageSize");

  hidPageSize.value = pageSize;
  hidOperateType.value = "resize";
  frmLogin.submit();
} 

function searchLogin() {
  if (checkSearch()) {
    var frmLogin = document.getElementById("frmLogin");
    var hidOperateType = document.getElementById("hidOperateType");
  
    hidOperateType.value = "search";
    frmLogin.submit();
  }
}
function cancelSearchLogin() {
  var frmLogin = document.getElementById("frmLogin");
  var hidOperateType = document.getElementById("hidOperateType");
  var txtSearchLoginName = document.getElementById("txtSearchLoginName");
  var txtSearchEmail = document.getElementById("txtSearchEmail");
  var txtSearchNickname = document.getElementById("txtSearchNickname");
  var txtSearchRemark = document.getElementById("txtSearchRemark");
  var txtSearchLoginTimeMin = document.getElementById("txtSearchLoginTimeMin");
  var txtSearchLoginTimeMax = document.getElementById("txtSearchLoginTimeMax");
  var txtSearchGradeMin = document.getElementById("txtSearchGradeMin");
  var txtSearchGradeMax = document.getElementById("txtSearchGradeMax");
  var txtSearchRegisterDateTimeBegin = document.getElementById("txtSearchRegisterDateTimeBegin");
  var txtSearchRegisterDateTimeEnd = document.getElementById("txtSearchRegisterDateTimeEnd");
  var txtSearchRegisterIp = document.getElementById("txtSearchRegisterIp");
  var txtSearchLastLoginDateTimeBegin = document.getElementById("txtSearchLastLoginDateTimeBegin");
  var txtSearchLastLoginDateTimeEnd = document.getElementById("txtSearchLastLoginDateTimeEnd");
  var txtSearchLastLoginIp = document.getElementById("txtSearchLastLoginIp");
  var selSearchStateId = document.getElementById("selSearchStateId");
  var selSearchTypeId = document.getElementById("selSearchTypeId");
  var selSearchDepartmentId = document.getElementById("selSearchDepartmentId");

  txtSearchLoginName.value = "";
  txtSearchEmail.value = "";
  txtSearchNickname.value = "";
  txtSearchRemark.value = "";
  txtSearchLoginTimeMin.value = "";
  txtSearchLoginTimeMax.value = "";
  txtSearchGradeMin.value = "";
  txtSearchGradeMax.value = "";
  txtSearchRegisterDateTimeBegin.value = "";
  txtSearchRegisterDateTimeEnd.value = "";
  txtSearchRegisterIp.value = "";
  txtSearchLastLoginDateTimeBegin.value = "";
  txtSearchLastLoginDateTimeEnd.value = "";
  txtSearchLastLoginIp.value = "";
  selSearchStateId.value = "";
  selSearchTypeId.value = "";
  selSearchDepartmentId.value = "";
  hidOperateType.value = "calcelSearch";
  frmLogin.submit();
}

function selectAll() {
  var chkSelectAll = document.getElementById("chkSelectAll");
  var chkLogins = document.getElementsByName("chkLogins");

  for (i = 0; i < chkLogins.length; i++) {
    chkLogins[i].checked = chkSelectAll.checked;
  }
}
function selectDepartment() {
  var frmLogin = document.getElementById("frmLogin");

  frmLogin.submit();
}

function myLoad() {
  ${alertMessage}
}
/* Curve chart ends */
</script>

</body>
</html>